Implement next-gen APC storage engine (APCng)#72
Merged
LKaemmerling merged 3 commits intoPromPHP:masterfrom Nov 5, 2021
Merged
Implement next-gen APC storage engine (APCng)#72LKaemmerling merged 3 commits intoPromPHP:masterfrom
LKaemmerling merged 3 commits intoPromPHP:masterfrom
Conversation
Signed-off-by: Paul Kreiner <Paul_Kreiner@intuit.com>
This was referenced Oct 28, 2021
LKaemmerling
reviewed
Nov 2, 2021
Member
LKaemmerling
left a comment
There was a problem hiding this comment.
Hey @thedeacon,
wow that is a really great contribution! Never had such a detailed description. From my perspective everything looks fine, I just have 2 smaller things. Really great and awesome job!
Signed-off-by: Paul Kreiner <Paul_Kreiner@intuit.com>
adda1be to
c535e4a
Compare
Contributor
Author
|
Thank you for the kind words, @LKaemmerling! I've fixed up the two items you pointed out. |
LKaemmerling
approved these changes
Nov 5, 2021
Member
|
As i said really good job @thedeacon! A release with the new storage engine will follow asap! Good job! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR deprecates the older PR #37 and solves Issue #36 . It also fixes a few places where Issue #27 can crop up, for instance if an APC value is deleted by another process at just the right moment, the
APCengine would spin forever waiting forapcu_casto succeed - this solves the problem by limiting the number of iterations we will wait.README.APCng.mdincludes detailed benchmarking results comparing the originalAPCengine vs this newAPCngengine, as requested by @LKaemmerling . Also as requested, this is implemented as a new Storage engine type, since the storage format is not compatible. Either theAPCorAPCngengine may be employed by users, both are currently treated equally andAPCremains unchanged.I put a fair amount of effort into a semi-automated performance-test "mini suite", including some assertions around performance of
APCngrelative toAPC(basically: it should be much faster forcollect()calls, and approximately the same speed for all other calls to the storage layer). This "Performance" PHPUnit group is excluded by default, since it takes many minutes to complete, but the README files include instructions on how to run this test suite. PHPUnit isn't the best tool for the job, but I do like the ability to make assertions about relative performance, and it beats trying to write up my own test harness and make it work cross-platform.By comparing the
src/Prometheus/Storage/APCng.phpwith theAPC.phpfrom #37 , one can see the overall structure of the engine is very similar, so most of the comments from that PR about the storage structure and function are still relevant. However, a few changes have been made to improve stability and speed, and remove complex code that offers little actual performance increase, based on real-world experience in our production environment. SeeREADME.APCng.mdfor a more-detailed description of how the engine works.I am happy to answer questions or respond/engage in any other ways needed for anyone reviewing this PR, just let me know!